﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section5
{
    public class Example05
    {
        public Example05()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            double[,] x = {{2.0,0.0,1.0},{1.0,1.0,2.0}};
            V.Matrix A = new V.Matrix(x);

            V.Matrix B = new V.Matrix(3, 3);

            B[0, 0] = 1.0;
            B[0, 1] = 0.0;
            B[0, 2] = 2.0;
            B[1, 0] = 0.0;
            B[1, 1] = 2.0;
            B[1, 2] = 1.0;
            B[2, 0] = 1.0;
            B[2, 1] = 1.0;
            B[2, 2] = 1.0;

            V.Matrix C = A * B;

            result += C[0, 0].ToString() + "   " + C[0, 1].ToString() + "   " + C[0, 2].ToString() + "\r\n";
            result += C[1, 0].ToString() + "   " + C[1, 1].ToString() + "   " + C[1, 2].ToString() + "\r\n";
        }
    }
}

/*
3   1   5
3   4   5
*/
